package business.global.pk.ddz.cardtype.type;

import business.ddz.c2s.cclass.DDZ_define;
import business.global.pk.alg.params.BaseOpCard;
import business.global.pk.alg.params.BasePKParameter;
import business.global.pk.alg.type.Type_FourWithTwoPairs;
import business.global.pk.ddz.cardtype.util.DDZALGUtil;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class DDZFourWithTwoPairs extends Type_FourWithTwoPairs<DDZALGUtil> {

    private List<Integer> cardTypeList = new ArrayList<>(Arrays.asList(DDZ_define.DDZ_CARD_TYPE.DDZ_CARD_TYPE_NOMARL.value(), DDZ_define.DDZ_CARD_TYPE.DDZ_CARD_TYPE_4DAI4.value()));

    @Override
    public BaseOpCard getCardList(BasePKParameter parameter) {
        if (cardTypeList.contains(parameter.previousOpType)) {
            parameter.targetType = DDZ_define.DDZ_CARD_TYPE.DDZ_CARD_TYPE_4DAI4.value();
            return getBasePKALGUtil().getFourWithTwoPairs(parameter);
        }

        return null;
    }

    @Override
    public BaseOpCard checkCardList(BasePKParameter parameter) {
        return getBasePKALGUtil().checkFourWithTwoPairs(parameter);
    }

    @Override
    public DDZALGUtil getBasePKALGUtil() {
        return DDZALGUtil.getInstance();
    }
}
